const { findBannerDao, updateBannerDao } = require('../dao/bannerDao')
const { formatResponse, handleDataPattern } = require('../utils/tool')

// 获取首页标题
module.exports.findBannerService = async function () {
    const data = handleDataPattern(await findBannerDao())
    return formatResponse(200, '获取首页标题成功', data)
}
// 修改首页标题
module.exports.updateBannerService = async function(bannerArr) {
    const data = handleDataPattern(await updateBannerDao(bannerArr))
    return formatResponse(200, '修改首页标题成功', data)
}